//
//  ProvinceCityController.swift
//  SlaughterClient
//
//  Created by Ken on 2020/2/14.
//  Copyright © 2020 zwb. All rights reserved.
//  本地省市区控件

import UIKit

class ProCitySelectCell: BadgeCollectionViewCell {
    
    var bg: UIView = {
        let v  = UIView()
        v.layer.cornerRadius = 5
        v.layer.masksToBounds = true
        v.backgroundColor = UIColor(kshex: "BBFFFF")
        return v
    }()
    var title: UILabel = {
        let lab :UILabel = UILabel()
        lab.textColor = UIColor(kshex:"#222222")
        lab.font = UIFont.systemFont(ofSize: 13)
        lab.textAlignment = .center
        lab.numberOfLines = 2
        return lab
    }()
 
    
    convenience required init(coder : NSCoder){
        self.init()
    }

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.initUtil()
    }
    
    func initUtil() {
        self.contentView.backgroundColor = .clear
        self.contentView.addSubview(bg)
        bg.snp.makeConstraints { (make) in
            make.edges.equalTo(UIEdgeInsets(top: 2, left: 2, bottom: 2, right: 2))
         }
        bg.addSubview(title)
        title.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.contentView)
            make.left.right.equalTo(self.contentView)

         }
        
        
    }
}
